﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Collections;

namespace GPCSC.Web.SHFW
{
    public class CL_TZ_S
    {
        public CL_TZ_S()
        { 
        
        }
        /// <summary>
        /// SYS_TZ.aspx  初次加载 显示个人的发件信息
        /// </summary>
        /// <returns></returns>
        public DataSet TzBound(string userid)
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            htable.Add("@userid", userid);
            ds = new SqlReadXml().ReaderDataSet("selTZbyuserid", htable);

            return ds;

        }
        /// <summary>
        /// SYS_TZ.aspx  初次加载 显示个人的收件信息
        /// </summary>
        /// <returns></returns>
        public DataSet TzBoundS(string userid)
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            htable.Add("@userid", userid);
            ds = new SqlReadXml().ReaderDataSet("selTZSbyuserid", htable);

            return ds;

        }
        /// <summary>
        /// SYS_TZ.aspx  初次加载 显示个人的收件信息
        /// </summary>
        /// <returns></returns>
        public DataSet TzBoundS(string userid,string IsRead)
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            htable.Add("@isread", IsRead);
            htable.Add("@userid", userid);
            ds = new SqlReadXml().ReaderDataSet("selTZSbyuseridIsR", htable);

            return ds;

        }

        /// <summary>
        /// SYS_TZV.aspx  初次加载 根据信件id 获取信件信息
        /// </summary>
        /// <returns></returns>
        public DataSet TzView(string tzid)
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            htable.Add("@tzid", tzid);
            ds = new SqlReadXml().ReaderDataSet("seltzbyid", htable);

            return ds;

        }

        /// <summary>
        /// 根据信息id 获取该信息的附件
        /// </summary>
        /// <param name="tzid"></param>
        /// <returns></returns>
        public DataSet getfile(string tzid)
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            htable.Add("@TZID", tzid);
            ds = new SqlReadXml().ReaderDataSet("seltzfilebyid", htable);
            return ds;
        }
        /// <summary>
        /// 根据信息id 遍历CL_TZUSER
        /// </summa
        /// <param name="tzid"></param>
        /// <returns></returns>
        public DataSet get_CL_TZUSER(string tzid)
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            htable.Add("@tzid", tzid);
            ds = new SqlReadXml().ReaderDataSet("seltzUserbyid", htable);
            return ds;
        }
    }
}